package com.test.demo;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;


/**
 * 添加一个定时任务
 * test
 * @author kk
 *
 */
@Component
public class DingShiTask {

	private static final SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
	
	@Scheduled(fixedRate=5000)
	public void DsTest() {
	//	System.out.println("当前时间为："+sdf.format(new Date()));
	}
	
}
